﻿using HAL9006.Terminal;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Umbraco.Web.Mvc;

namespace HAL9006.Blog.Controllers
{
    public class MyAwesomeContext
    {
        public MyAwesomeContext()
        {
            MyId = Guid.NewGuid();
        }
        public Guid MyId { get; private set; }
    }
    public class HomeController : RenderMvcController
    {
        private readonly MyAwesomeContext _myAwesome;
        private readonly ITerminalCommand _command;

        public HomeController(MyAwesomeContext myAwesome, ITerminalCommand command)
        {
            _myAwesome = myAwesome;
            _command = command;
        }

        public override ActionResult Index(Umbraco.Web.Models.RenderModel model)
        {
            //if (Request.IsAjaxRequest()) {
            //    return new CommandMap().Execute(Request.Params["p"]);
            //    //return PartialView(Request.Params["p"]);
            //}
            ////throw new Exception("test");
            ////get the current template name
            //var template = this.ControllerContext.RouteData.Values["action"].ToString();
            //return the view with the model as the id of the custom class
            return View();
        }
    }
}